package com.youtills.resource;

import com.youtills.action.ActionContext;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * TODO - !!!doc me!!!
 *
 * @author ravi.chiluveru
 * @since 23.0 (7/28/14)
 */
public final class HttpEditResourceController extends EditResourceController<HttpResponse> implements HttpResourceController, HtmlLayoutResponse, HtmlResponse {

    private final HttpServletRequest request;
    private final HttpServletResponse response;

    public HttpEditResourceController(HttpServletRequest request, HttpServletResponse response) {
        super(new ActionContext.Http(request, response));
        this.request = request;
        this.response = response;
    }

    public HttpServletRequest getRequest() {
        return request;
    }

    public HttpServletResponse getResponse() {
        return response;
    }

    @Override
    public HttpResponse execute() {
        return super.execute();
    }

    @Override
    public String getLayoutPage() {
        return null;
    }

    @Override
    public String getContentPage() {
        return "/WEB-INF/jsp/resource/resource-edit.jsp";
    }


}
